<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport">
    <title>会员中心</title>
    <meta content="" name="keywords">
    <meta content="" name="description">
    <script src="js/rem.js"></script>
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <link href="css/base.css" rel="stylesheet" type="text/css"/>
    <link href="css/page.css" rel="stylesheet" type="text/css"/>
    <link href="css/all.css" rel="stylesheet" type="text/css"/>
    <link href="css/mui.min.css" rel="stylesheet" type="text/css"/>
    <link href="css/loaders.min.css" rel="stylesheet" type="text/css"/>
    <link href="css/loading.css" rel="stylesheet" type="text/css"/>
    <link href="slick/slick.css" rel="stylesheet" type="text/css"/>
</head>
<!--loading页开始-->
<div class="loading">
    <div class="loader">
        <div class="loader-inner pacman">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
</div>
<!--loading页结束-->
<body>
<!--header star-->
<header class="mui-bar mui-bar1 mui-bar-nav mui-bar-nav1" id="header">
    <a class="btn" href="javascript:history.go(-1)">
        <i class="iconfont icon-fanhui"></i>
    </a>
    <div class="top-sch-box top-sch-boxtwo top-sch-boxthree flex-col">
        返回
    </div>
</header>
<!--header end-->

<div class="warp warpthree clearfloat">
    <div class="h-top h-toptwo clearfloat box-s">
        <div class="tu">
            <img id="profile" src="img/touxiang.png"/>
        </div>
        <div class="nr clearfloat fl">
            <p class="hname" id="name"></p>
            <p class="htel" id="phone"></p>
        </div>
    </div>
    <div class="cashlist clearfloat">
        <ul>
            <li class="box-s">
                <a href="recharge.html">
                    <p class="fl">现金充值</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="account.html">
                    <p class="fl">现金账户管理</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="zhuanzhang.html">
                    <p class="fl">现金转账</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
        </ul>
    </div>
    <div class="cashlist clearfloat">
        <ul>
            <li class="box-s">
                <a href="jfguanli.html">
                    <p class="fl">可用积分管理</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="jfguanli.html">
                    <p class="fl">待用积分管理</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="jfguanli.html">
                    <p class="fl">业务奖励积分</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="jfzhuanyong.html">
                    <p class="fl">可用转待用</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="jfzhuanzhang.html">
                    <p class="fl">可用积分转账</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
        </ul>
    </div>
    <div class="cashlist clearfloat">
        <ul>
            <li class="box-s">
                <a href="spduihuan.html">
                    <p class="fl">商品兑换券</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="baodan.html">
                    <p class="fl">报单商品券</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
        </ul>
    </div>
    <div class="cashlist clearfloat">
        <ul>
            <li class="box-s">
                <a href="sqlianmeng.html">
                    <p class="fl">申请联盟商家</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="sqyunying.html">
                    <p class="fl">申请运营中心</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="order.html">
                    <p class="fl">消费订单管理</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="friend.html">
                    <p class="fl">我的好友</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="editUserInfo.html">
                    <p class="fl">个人信息管理</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
            <li class="box-s">
                <a href="updatePassword.html">
                    <p class="fl">密码管理</p>
                    <i class="iconfont icon-jiantou1 fr"></i>
                </a>
            </li>
        </ul>
        <a class="center-btn db ra3" href="#">退出登录</a>
        <div>1</div>
        <div>1</div>
    </div>
</div>

<!--footer star-->
<footer class="page-footer fixed-footer" id="footer">
    <ul>
        <li>
            <a href="index.html">
                <i class="iconfont icon-shouye"></i>
                <p>商城</p>
            </a>
        </li>
        <li>
            <a href="#">
                <i class="iconfont icon-erweima1"></i>
                <p>二维码</p>
            </a>
        </li>
        <li>
            <a href="#">
                <i class="iconfont icon-kefu1"></i>
                <p>客服</p>
            </a>
        </li>
        <li class="active">
            <a href="center.html">
                <i class="iconfont icon-yonghuming"></i>
                <p>我的</p>
            </a>
        </li>
    </ul>
</footer>
<!--footer end-->
</body>
<script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="js/mui.min.js"></script>
<script src="js/others.js"></script>
<script src="js/hmt.js" type="text/javascript"></script>
<script src="slick/slick.js" type="text/javascript"></script>
<!--插件-->
<link href="css/swiper.min.css" rel="stylesheet">
<script src="js/swiper.jquery.min.js"></script>
<script type="text/javascript">
    $(window).load(function () {
        let loading = $(".loading")
        loading.addClass("loader-chanage");
        loading.fadeOut(300)
    })

    $(function () {
        $.ajax({
            url: 'api/user/getUserInfo',
            type: 'GET',
            headers: {
                'AccessToken': window.localStorage.getItem('AccessToken')
            },
            success: function (result) {
                if (result.code === 1) {
                    let user = result.data;
                    let name = user.name;
                    name = isEmpty(name) ? 'hmall用户' + user.id : name;
                    window.localStorage.setItem('name', name);
                    window.localStorage.setItem('sex', user.sex);
                    window.localStorage.setItem('id', user.id);
                    $('#name').text(name);
                    $('#phone').text(result.data.phone);
                    $('#profile').attr('src', user.avatar);
                } else {
                    alert(result.msg);
                }
            }
        })
    });

    function isEmpty(val) {
        if (val === null || val === undefined || val === '') {
            return true;
        }
    }
</script>
</html>
